<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/axios.js"></script>
</head>
<body>
    <h1>reg注册页面</h1>
    <script>

        function getAAA(){
            let data = {
            username:'zhangsan',
            password:123456,
            rpassword:123456,
            nickname:'六点多点'
        }
        axios
          .post("http://localhost:3000/users/regist", data)
          .then((resData) => {
            console.log(resData);
            // if (resData.data.code == 0) {
            //   let oSpan = document.querySelector("span");
            //   oSpan.innerText = resData.data.msg;
            // }
            // if (resData.data.code == 1) {
            //   location.href = "login";
            // }
          });
        }
        getAAA()
    </script>
</body>
</html>